<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
namespace Taxx\KernelBundle\Model\Utils;
/**
 * Description of Translator
 *
 * @author flocki
 */
class JsonTranslator 
{
    public static function parseTranslationFile($file_path)
    {
        $handle = fopen($file_path, "r");
        $contents = fread($handle, filesize($file_path));
        fclose($handle);
        $parse_parts = explode("/*json_start*/", $contents);
        $parse_parts = explode("/*json_end*/", $parse_parts[1]);
        $json = $parse_parts[0];
        $array = json_decode($json, true);
        return $array;
    }
}

?>
